package com.dao.lims; 

import com.model.lims.TestModel; 
import java.sql.SQLException;
import java.util.List; 
import java.util.Map; 
import org.apache.ibatis.annotations.Param; 
import org.springframework.stereotype.Repository;

@Repository("limsTestDao")
public interface TestDao  { 

	/**
	 * 新增
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int insert(TestModel testModel);

	
	int deleteByOrdNo(String ordNo);
	
	List<TestModel> selectByOrdNo(String ordNo);
	int deleteBySampDate(String sampDate);
	
	List<TestModel> selectBySampDate(String sampDate);
	int deleteByTankNum(String tankNum);
	
	List<TestModel> selectByTankNum(String tankNum);
	int deleteByProductNo(String productNo);
	
	List<TestModel> selectByProductNo(String productNo);
	int deleteByTestAnalyte(String testAnalyte);
	
	List<TestModel> selectByTestAnalyte(String testAnalyte);
	
	/**
	 * 刪除
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int delete(@Param("ordNo")String ordNo,@Param("sampDate")String sampDate,@Param("tankNum")String tankNum,@Param("productNo")String productNo,@Param("testAnalyte")String testAnalyte);

	/**
	 * 更新
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	int update(TestModel testModel);

	/**
	 * 查询 根据主键 id 查询
	 * 
	 * @author chenjun
	 * @date 2022/03/10
	 **/
	TestModel load(@Param("ordNo")String ordNo,@Param("sampDate")String sampDate,@Param("tankNum")String tankNum,@Param("productNo")String productNo,@Param("testAnalyte")String testAnalyte);


	// 列表
	List<TestModel> selectList(Map<String, Object> map);

	// 列表总数
	int selectListCount(Map<String, Object> map);
 }